package com.anycl.spring.aop;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

@Setter
@Slf4j
public class Blue implements CompactDisc {

    private String title;

    private String artist;

    private List<String> tracks;

    public void play() {
        log.info("Playing " + title + " by " + artist);
        for (String track: tracks)
            log.info("-Track: " + track);
    }

    public void playTrack(int m) {
        if (m < tracks.size()) {
            System.out.println("playTrack: " + m + " value : "  + tracks.get(m));
        }
    }


}
